Skip to main content
Version: 4.0

Get Business Topics for Subscription

Get the list of business topics that can be externally subscribed on the current platform.

Path
http://{supOS ip:port}/open-api/webhook/v2/topics
Query parameter
  • current: Page number.
  • pageSize: Items on the page.
Response
  • 200: Successful.
{
"list": [
{
"businessTopic": "myTopic",
"businessModule": "Organization",
"description": "my topic"
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
  • 400
{
"code": 100108503,
"message": "username cannot be empty"
}
  • 500
{
"code": 100000007,
"message": "service internal error"
}
    • 100121001: Business topic not found.
    • 100121005: The current parameter needs to be greater than 0.
    • 100121006: pageSize needs to be set between 20-500.
    • 100000007: Internal service exception.

Subscribe Business Topics

Subscribe business topics from external. Batch subscription is available.

Path
http://{supOS ip:port}/open-api/webhook/v2/topics/subscribe
Request body
{
"tenantId": "dt", //required
"appId": "App_ca4f1aeb382142849cebadb8b780c9ed", //required
"webhookUrl": "http://127.0.0.1/listen/message", //required
"topicList": [
"myTopic"
]
}
Response
  • 200: Successful.
{
"appRegisterId": 2646255255224320,
"topicHistoryStatusList": [
{
"businessTopic": "myTopic",
"historyStatus": false
}
]
}
  • 500
{
"code": 100000007,
"message": "service internal error"
}

Change Subscribed Topic History to Read

info

When historyStatus is returned as false after calling the /topics/subscribe API, you need to synchronize full historical data, and then call this API again to get incremental business data.

Path
http://{supOS ip:port}/open-api/webhook/v2/topics/readiness
Request body
{
"tenantId": "dt", //required
"appId": "App_ca4f1aeb382142849cebadb8b780c9ed", //required
"topicList": [
"myTopic"
]
}
Response
  • 200: Successful.
{
"data": true
}
  • 500
{
"code": 100000007,
"message": "service internal error"
}

Activate Pushed Task

info

Usually used when the subscriber service restarts or data inconsistancy happens.

Path
http://{supOS ip:port}/open-api/webhook/v2/retry
Request body
{
"tenantId": "dt", //required
"appId": "App_ca4f1aeb382142849cebadb8b780c9ed", //required
"topicList": [
"myTopic"
]
}
Response
  • 200: Successful.
  • 500
{
"code": "string",
"message": "string"
}